//
//  Focus_Cell.m
//  penzer
//
//  Created by caiyc on 2018/9/29.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "Focus_Cell.h"

@implementation Focus_Cell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.adressView.layer.cornerRadius = 5;
    self.adressView.layer.masksToBounds = 1;
    self.ageView.layer.cornerRadius = 5;
    self.ageView.layer.masksToBounds = 1;
    self.icon.layer.cornerRadius = 30;
    self.icon.layer.masksToBounds = 1;
    
    // Initialization code
}
- (IBAction)cancelfouc:(id)sender {
    self.cancels();
}

-(void)bindData:(NSDictionary *)dic{
    NSURL *url = [NSURL URLWithString:dic[@"avatar"]];
    [self.icon sd_setImageWithURL:url];
    self.nick.text = dic[@"nickname"];
    self.fans.text = [NSString stringWithFormat:@"%@关注",dic[@"fans"]];
    NSInteger sex = [dic[@"sex"]integerValue];
    if(sex==1){
        self.seximg.image = [UIImage imageNamed:@"男"];
    }else{
        self.seximg.image = [UIImage imageNamed:@"女"];
    }
    self.age.text = [NSString stringWithFormat:@"%@岁",dic[@"age"]];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
